{extend name="public:layout" /}
{block name="title"}添加字典{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> 字典管理</a></li>
                <li class="active">添加字典</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <input type="hidden" name="type_id" value="{$Request.param.type_id}" />
                <div class="form-group">
                    <label class="col-sm-2 control-label">字典名字</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入字典名称"
                               name="dict_name" datatype="*"
                               nullmsg="请输入字典名！" errormsg=""/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">字典标识</label>

                    <div class="col-sm-4">
                        <input type="text" class="form-control"
                               placeholder="请输入字典标识" name="dict_id"
                               datatype="n" nullmsg="请输入字典名！" errormsg="请用数字标识"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">是否锁定</label>

                    <div class="col-sm-10">
                        <label class="radio-inline i-checks">
                            <input type="radio" checked name="is_fixed" value="0"> 解锁
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="is_fixed" value="1" checked> 锁定
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" id="btnSub">
                            保存内容
                        </button>
                        <a href="{:url('index',['type_id'=>$Request.param.type_id])}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        ajaxSubForm('#btnSub');
    })
</script>
{/block}